package com.cimpm.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hby.common.annotation.entity.VerifyMultiRepetitionField;

import java.util.Date;

@TableName("model_node")
public class Node {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

	@VerifyMultiRepetitionField
	@TableField(value = "`name`")
	private String name;

	@VerifyMultiRepetitionField
	@TableField(value = "`parent_id`")
	private Integer parentId;

    @TableLogic
    @TableField(value = "`is_deleted`")
    private Date isDeleted;

    @Version
    @TableField(value = "`version`")
    private Integer version;

    public Integer getId() { return id; }

    public void setId(Integer id) { this.id = id; }

    public String getName() { return name; }

    public void setName(String name) { this.name = name; }

    public Integer getParentId() { return parentId; }

    public void setParentId(Integer parentId) { this.parentId = parentId; }

    public Date getIsDeleted() { return isDeleted; }

    public void setIsDeleted(Date isDeleted) { this.isDeleted = isDeleted; }

    public Integer getVersion() { return version; }

    public void setVersion(Integer version) { this.version = version; }

    @Override
    public String toString() {
    return "node{" +
            "id=" + id +
            ", name=" + name +
            ", parentId=" + parentId +
            ", isDeleted=" + isDeleted +
            ", version=" + version +
            '}';
    }

}
